{include file="public/head"}
<script src="__JS__/jquery.js" type="text/javascript" charset="utf-8"></script>
<!--2.模块化使用-->
<script src="__STATIC__/dist/layui.all.js" type="text/javascript" charset="utf-8"></script>

<body>
    <div class="x-body">
        <div  class="lotus-nav" >
            <div class="layui-input-inline">
				<input id="begin" name="begin" class="layui-input lotus-input" placeholder="开始时间" value="{$Request.param.begin}">
			</div>
			<div class="layui-input-inline">
				<input id="end" name="end" class="layui-input lotus-input" placeholder="结束时间" value="{$Request.param.end}">
			</div>
			<button class="layui-btn layui-btn-sm" onclick="search()"><i class="layui-icon layui-icon-search"></i></button>

            <span class="x-right"><button onclick="javascript:location.reload()" class="layui-btn-default "><i class="layui-icon layui-icon-refresh"></i></button></span>

        </div>

    <table class="layui-table">
        <thead>
          	<tr>
            	<th>点击次数</th>
            	<th>点击人次</th>
            	<th>领券次数</th>
            	<th>领券人数</th>
            	<th>消耗积分总和</th>
	        </tr>
        </thead>
        <tbody>
	    	<tr>
	            <td>{$actionHits}</td>
	            <td>{$peopleHits}</td>
	            <td>{$couponGets}</td>
	            <td>{$couponPeoples}</td>
	            <td>{$pointSum}</td>
	        </tr>
        </tbody>
      </table>
    </div>
</body>
<script>
	layui.use('layer', function() { //独立版的layer无需执行这一句
		var $ = layui.jquery,
			layer = layui.layer; //独立版的layer无需执行这一句
		var laydate = layui.laydate,
			upload = layui.upload;

		//执行一个laydate实例
		laydate.render({
			elem: '#begin' //指定元素
				,
			type: 'date'
		});
		//执行一个laydate实例
		laydate.render({
			elem: '#end' //指定元素
				,
			type: 'date'
		});

	});

	function search() {
		var keyword = $('#keyword').val();
		var begin = $('#begin').val();
		var end = $('#end').val();

		var urls = "/admin/Actionstat/index/begin/" + begin + '/end/' + end + '/id/{$actionId}';
		console.log(urls)
		window.location = urls;
	}
	//导出
	function downExcel() {
		var keyword = $('#keyword').val();
		var begin = $('#begin').val();
		var end = $('#end').val();

		var urls = "/admin/Outexcel/downExcelExchange/keyword/" + keyword + "/begin/" + begin + '/end/' + end;
		console.log('urls', urls)
		window.location = urls;
	}
	//数组排序
	function compare(a, b) {
		if(a < b) {
			return -1;
		}
		if(a > b) {
			return 1;
		}
		// a = b
		return 0;
	}
</script>
{include file="public/foot"}